import java.awt.BorderLayout;

import javax.swing.*;

public class Lab1 {

	public static void main(String[] args) {
	
		JFrame.setDefaultLookAndFeelDecorated(true);

		JFrame frame = new JFrame("My JFrame");
		JTextArea _resultArea = new JTextArea(6, 20);

		_resultArea.setText("Enter more text to see scrollbars");
		JScrollPane scrollingArea = new JScrollPane(_resultArea);

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setSize(250, 250);
		frame.setLocation(300, 200);
		frame.setVisible(true);

		frame.getContentPane().add(BorderLayout.CENTER, new 

JTextArea(10, 40));
		frame.add(scrollingArea, BorderLayout.CENTER);

	}

}
